Spark DataFrame 添加索引列 若DataFrame為簡單的二維表,則可以借助RDD的zipWithIndex實現索引列添加。 若DataFrame來源於JSON格式數據,直接通過rdd.zipWithIndex實現 ...